<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>脉轮测试</title>
  <style>

    .btn {
      width: 90%;
      height: 40px;
      line-height: 40px;
      text-align: center;
      font-size: 16px;
      color: #fff;
      background-color: #0d8ddb;
      border: none;
      border-radius: 20px;
      outline: none;
      display: block;
      margin: 0 auto 40px;
      text-decoration: none;
    }

    h5,p {
      margin: 10px 0;
    }

    p {
      overflow: hidden;
    }

    label {
      width: 20%;
      display: inline-block;
      height: 25px;
      line-height: 25px;
      float: left;
    }
  </style>
</head>
<body>
<form action="" method="post">
  {foreach $question_data as $k => $v}
  <h5>{$k+1}. {$v.question}</h5>
  <p>
    <label><input type="radio" name="q{$v.id}" value="1" {if $v.checked==1}checked{/if}>没有</label>
    <label><input type="radio" name="q{$v.id}" value="2" {if $v.checked==2}checked{/if}>很少</label>
    <label><input type="radio" name="q{$v.id}" value="3" {if $v.checked==3}checked{/if}>偶尔</label>
    <label><input type="radio" name="q{$v.id}" value="4" {if $v.checked==4}checked{/if}>经常</label>
    <label><input type="radio" name="q{$v.id}" value="5" {if $v.checked==5}checked{/if}>总是</label>
  </p>
  {/foreach}
  <button type="submit" class="btn">提交</button>
</form>

</body>
</html>
